import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginView from '../views/LoginView.vue'
import RegisterView from '../views/RegisterView.vue'
import MainView from '../views/MainView.vue'
import TransferContractView from "@/views/TransferContractView";
import DriverView from "@/views/DriverView";
import Rec1View from '../views/receive/Rec1View.vue'
import Rec2View from '../views/receive/Rec2View.vue'
import Com1View from '../views/complain/Com1View.vue'
import Com2View from '../views/complain/Com2View.vue'
import CustomerView from '../views/CustomerManager/CustomerView'
import BackgroundUserView from '../views/BackgroundUserManager/BackgroundUserView'
import RecordView from '../views/RecordView.vue'
import DetailsView from '../views/DetailsView.vue'
import ModifyView from '../views/ModifyView.vue'
import AddView from '../views/AddView.vue'
import BillView from '../views/total/BillView.vue'
import EmployeeView from '../views/total/EmployeeView.vue'
import FrightView from '../views/total/FreightView.vue'
/*import MapDemo from 'mapdemo01.vue'*/
import BarView from '../views/total/BarView.vue'
import DriverBillView from '../views/total/DriverBillView.vue'
import FreightBillView from '../views/total/FreightBillView.vue'
import PersonalView from '../views/total/PersonalView.vue'
import CarriageBillView from '../views/total/CarriageBillView.vue'

//到货管理部分
import Driver_receipt from '../views/arrivalmanager/Driver_receipt.vue'
import Customer_receipt from '../views/arrivalmanager/Customer_receipt.vue'
import ErrorRecordView from '../views/arrivalmanager/ErrorRecordView.vue'
import GoodsArrivalView from '../views/arrivalmanager/GoodsArrivalView.vue'
/*import ArrivalHistoryView from "../views/arrivalmanager/ArrivalHistoryView";*/
// import Map from '../views/Map.vue'

import Way1View from '../views/waybill/Way1View.vue'
import Way2View from '../views/waybill/Way2View.vue'
import Drs1View from '../views/driverset/Drs1View.vue'
import Drs2View from '../views/driverset/Drs2View.vue'
import Colls1View from '../views/collectionset/Colls1View.vue'
import Colls2View from '../views/collectionset/Colls2View.vue'
import OneBusView from '../views/business/OneBusView.vue'
// import AllBusView from '../views/business/AllBusView.vue'
import DriverMap from "@/views/DriverMap";
import IndexView from "@/views/IndexView";

Vue.use(VueRouter)

const routes = [
	{
		path: '/',
		name: 'index',
		component: IndexView,
	},
	{
	path: '/main',
	name: 'main',
	component: MainView,
	children: [
		{
			path: '/dashboard',
			name: 'personal',
			component: PersonalView
		},
		{
			path: '/driverMap',
			name: 'DriverMap',
			component: DriverMap
		},
		{
			path: '/Driver_receipt',
			name: 'Driver_receipt',
			component: Driver_receipt
		},
		{
			path: '/Customer_receipt',
			name: 'Customer_receipt',
			component: Customer_receipt
		},
		{
			path: '/errorRecordView',
			name: 'errorRecordView',
			component: ErrorRecordView
		},
		{
			path: '/goodsArrivalView',
			name: 'goodsArrivalView',
			component: GoodsArrivalView
		},
		/*{
			path: '/arrivalHistoryView',
			name: 'arrivalHistoryView',
			component: ArrivalHistoryView
		},*/
		{
			path: '/receive/rec1',
			name: 'rec1',
			component: Rec1View
		},
		{
			path: '/receive/rec2',
			name: 'rec2',
			component: Rec2View
		},
		{
			path: '/complain/com1',
			name: 'com1',
			component: Com1View
		},
		{
			path: '/complain/com2',
			name: 'com2',
			component: Com2View
		},
		{
			path: '/transferContract',
			name: 'transferContract',
			component: TransferContractView,
		},
		{
			path: '/driver',
			name: 'driver',
			component: DriverView,
		},
		{
			path: '/customerview',
			name: 'customerView',
			component: CustomerView,
		},
		{
			path: '/backgrounduserview',
			name: 'backgrounduserview',
			component: BackgroundUserView,
		},
		{
			path: '/record',
			name: 'record',
			component: RecordView
		}, {
			path: '/add',
			name: 'add',
			component: AddView
		},
		{
			path: '/total/bill',
			name: 'bill',
			component: BillView
		},
		{
			path: '/total/bar',
			name: 'bar',
			component: BarView
		},
		{
			path: '/total/freightBill',
			name: 'freightBill',
			component: FreightBillView
		},
		{
			path: '/total/employee',
			name: 'employee',
			component: EmployeeView
		},
		{
			path: '/total/fright',
			name: 'fright',
			component: FrightView
		},
		{
			path: '/total/driver',
			name: 'driver',
			component: DriverBillView
		},
		{
			path: '/total/carriage',
			name: 'carriage',
			component: CarriageBillView
		},
		{
			path: '/waybill/way1',
			name: 'way1',
			component: Way1View
		},
		{
			path: '/waybill/way2',
			name: 'way2',
			component: Way2View
		},
		{
			path: '/driverset/drs1',
			name: 'drs1',
			component: Drs1View
		},
		{
			path: '/driverset/drs2',
			name: 'drs2',
			component: Drs2View
		},
		{
			path: '/collectionset/colls1',
			name: 'colls1',
			component: Colls1View
		},
		{
			path: '/collectionset/colls2',
			name: 'colls2',
			component: Colls2View
		},
		{
			path: '/business/onebus',
			name: 'onebus',
			component: OneBusView
		},
		// {
		// 	path: '/business/allbus',
		// 	name: 'allbus',
		// 	component: AllBusView
		// },
		{
			path: '/details',
			name: 'details',
			component: DetailsView
		},
		{
			path: '/modify',
			name: 'modify',
			component: ModifyView
		},
		/* {
			path: '/map',
			name: 'map',
			component: Map
		}, */
		{
			path: '/details',
			name: 'details',
			component: DetailsView
		}, {
			path: '/modify',
			name: 'modify',
			component: ModifyView
		},
	]},
	{
		path: '/login',
		name: 'login',
		component: LoginView
	},
	{
		path: '/register',
		name: 'register',
		component: RegisterView
	}

]

const router = new VueRouter({
	mode: 'history',
	base: process.env.BASE_URL,
	routes
})

export default router
